package com.gqz.patrol.app.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


/**
 * @ClassName EnPatrolTaskPeriodEntity
 * @Description 能源-巡视工单_周期任务表
 */


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("T_EN_PATROL_TASK_PERIOD")
public class EnPatrolTaskPeriodEntity implements Serializable {

    /**
     * 主键标识
     */
    @TableId
    private String id;

    /**
     * 工单编号
     */
    @TableField(value = "TASK_NO")
    private String taskNo;

    /**
     * 工单名称
     */
    @TableField(value = "TASK_NAME")
    private String taskName;

    /**
     * 运维单位编码
     */
    @TableField(value = "MAINTAIN_UNIT_NO")
    private String maintainUnitNo;

    /**
     * 运维单位
     */
    @TableField(value = "MAINTAIN_UNIT_NAME")
    private String maintainUnitName;

    /**
     * 运维班组编码
     */
    @TableField(value = "MAINTAIN_TEAM_NO")
    private String maintainTeamNo;

    /**
     * 运维班组
     */
    @TableField(value = "MAINTAIN_TEAM_NAME")
    private String maintainTeamName;

    /**
     * 巡视人员编号
     */
    @TableField(value = "PATROL_PERSON_ID")
    private String patrolPersonId;

    /**
     * 巡视人员
     */
    @TableField(value = "PATROL_PERSON_NAME")
    private String patrolPersonName;

    /**
     * 巡视机房编码
     */
    @TableField(value = "PATROL_ROOM_NO")
    private String patrolRoomNo;

    /**
     * 巡视机房
     */
    @TableField(value = "PATROL_ROOM_NAME")
    private String patrolRoomName;

    /**
     * 巡视对象编码s
     */
    @TableField(value = "PATROL_TARGET_NOS")
    private String patrolTargetNos;

    /**
     * 巡视对象s
     */
    @TableField(value = "PATROL_TARGET_NAMES")
    private String patrolTargetNames;

    /**
     * 巡视对象类型编码s
     */
    @TableField(value = "PATROL_TARGET_TYPE_NOS")
    private String patrolTargetTypeNos;

    /**
     * 巡视对象类型s
     */
    @TableField(value = "PATROL_TARGET_TYPE_NAMES")
    private String patrolTargetTypeNames;

    /**
     * 计划开始时间
     */
    @TableField(value = "PLAN_START_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "planStartTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date planStartTime;

    /**
     * 计划结束时间
     */
    @TableField(value = "PLAN_END_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "planEndTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date planEndTime;

    /**
     * 巡视内容描述
     */
    @TableField(value = "PATROL_DESCRIPTION")
    private String patrolDescription;

    /**
     * 巡视类型编码
     */
    @TableField(value = "PATROL_TYPE_NO")
    private String patrolTypeNo;

    /**
     * 巡视类型
     */
    @TableField(value = "PATROL_TYPE_NAME")
    private String patrolTypeName;

    /**
     * 工单来源(1.平台2.app)
     */
    @TableField(value = "TASK_SOURCE_NO")
    private String taskSourceNo;

    /**
     * 平台工单状态编码 0-未派单 1-已派单 2-到达现场 3-巡视结束 99-归档
     */
    @TableField(value = "P_TASK_STATUS_NO")
    private String pTaskStatusNo;

    /**
     * 平台工单状态
     */
    @TableField(value = "P_TASK_STATUS_NAME")
    private String pTaskStatusName;

    /**
     * App工单状态编码
     */
    @TableField(value = "A_TASK_STATUS_NO")
    private String aTaskStatusNo;

    /**
     * App工单状态
     */
    @TableField(value = "A_TASK_STATUS_NAME")
    private String aTaskStatusName;

    /**
     * 创建工单人
     */
    @TableField(value = "CREATOR")
    private String creator;

    /**
     * 创建工单人id
     */
    @TableField(value = "CREATOR_BM")
    private String creatorBm;

    /**
     * 创建工单时间
     */
    @TableField(value = "CREAT_TIME")
    private String creatTime;

    /**
     * 派单人编号
     */
    @TableField(value = "SEND_PERSON_ID")
    private String sendPersonId;

    /**
     * 派单人
     */
    @TableField(value = "SEND_PERSON_NAME")
    private String sendPersonName;

    /**
     * 派单人电话
     */
    @TableField(value = "SEND_TEL")
    private String sendTel;

    /**
     * 派单时间
     */
    @TableField(value = "SEND_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "sendTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    /**
     * 接单人编号
     */
    @TableField(value = "RECEIVER_ID")
    private String receiverId;

    /**
     * 接单人
     */
    @TableField(value = "RECEIVER")
    private String receiver;

    /**
     * 接单人电话
     */
    @TableField(value = "RECEIVER_TEL")
    private String receiverTel;

    /**
     * 接单时间
     */
    @TableField(value = "RECEIVER_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "receiverTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date receiverTime;

    /**
     * 接单坐标
     */
    @TableField(value = "RECEIVING_COORDINATE")
    private String receivingCoordinate;

    /**
     * 认证时间
     */
    @TableField(value = "AUTH_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "authTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date authTime;

    /**
     * 现场描述
     */
    @TableField(value = "SCENE_DESCRIPTION")
    private String sceneDescription;

    /**
     * 现场描述图片IDs
     */
    @TableField(value = "SITE_PICTURE_IDS")
    private String sitePictureIds;

    /**
     * 退单时间
     */
    @TableField(value = "BACK_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "backTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date backTime;

    /**
     * app结束工单时间
     */
    @TableField(value = "A_END_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "aEndTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date aEndTime;

    /**
     * app结束工单坐标
     */
    @TableField(value = "A_END_COORDINATE")
    private String aEndCoordinate;

    /**
     * 是否删除 0-否 1-是
     */
    @TableField(value = "IS_DEL")
    private String isDel;

    /**
     * 周期
     */
    @TableField(value = "PERIOD")
    private String period;

    /**
     * 周期截止时间
     */
    @TableField(value = "PERIOD_END_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "periodEndTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date periodEndTime;

    /**
     * 是否周期产生的工单0-否 1-是
     */
    @TableField(value = "IS_PERIOD")
    private String isPeriod;

    /**
     * 周期工单的源工单
     */
    @TableField(value = "SOURCE_TASK_NO")
    private String sourceTaskNo;

    /**
     * 认证图片IDs
     */
    @TableField(value = "AUTH_PICTURE_IDS")
    private String authPictureIds;

    /**
     * 评价说明
     */
    @TableField(value = "APPRAISE_CONTENT")
    private String appraiseContent;

    /**
     * 评价人id
     */
    @TableField(value = "APPRAISE_PERSON_ID")
    private String appraisePersonId;

    /**
     * 评价人名称
     */
    @TableField(value = "APPRAISE_PERSON_NAME")
    private String appraisePersonName;

    /**
     * 评价时间
     */
    @TableField(value = "APPRAISE_TIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "appraiseTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date appraiseTime;

    /**
     * 评价结论 1-合格 2-不合格
     */
    @TableField(value = "APPRAISE_STATUS")
    private String appraiseStatus;

    /**
     * 评价结论 合格 不合格
     */
    @TableField(value = "APPRAISE_STATUS_NAME")
    private String appraiseStatusName;

    /**
     * 巡视结论
     */
    @TableField(value = "PATROL_CONCLUSION")
    private String patrolConclusion;

    /**
     * 是否检查机房卫生
     */
    @TableField(value = "IS_CLEAN")
    private String isClean;

    /**
     * 卫生-机房整体
     */
    @TableField(value = "JF_OVERALL_PICTURE_IDS")
    private String jfOverallPictureIds;

    /**
     * 卫生-机房门口
     */
    @TableField(value = "JF_DOORWAY_PICTURE_IDS")
    private String jfDoorwayPictureIds;

    /**
     * 卫生-主要设备
     */
    @TableField(value = "JF_MAJOR_EQUIP_PICTURE_IDS")
    private String jfMajorEquipPictureIds;

    /**
     * 备注
     */
    @TableField(value = "REMARK")
    private String remark;

    /**
     * 任务执行-开始时间
     */
    @TableField(value = "EXECUTE_STIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "executeStime", format = "yyyy-MM-dd HH:mm:ss")
    private Date executeStime;

    /**
     * 任务执行-结束时间
     */
    @TableField(value = "EXECUTE_ETIME")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(name = "executeEtime", format = "yyyy-MM-dd HH:mm:ss")
    private Date executeEtime;

    /**
     * 任务执行-id
     */
    @TableField(value = "EXECUTE_ID")
    private String executeId;

    /**
     * 任务执行-编号
     */
    @TableField(value = "EXECUTE_TASK_NO")
    private String executeTaskNo;

    /**
     * 任务执行-状态
     */
    @TableField(value = "EXECUTE_STATUS")
    private String executeStatus;

    /**
     * 任务执行-第几个周期
     */
    @TableField(value = "EXECUTE_PERIOD_NUM")
    private String executePeriodNum;

    /**
     * start����Ǳ���Ҫ�Ķ�̬��������start   start
     */
    private static Map<String, SFunction<EnPatrolTaskPeriodEntity, ?>> map;

    static {
        map = new HashMap<>();
        map.put("id", EnPatrolTaskPeriodEntity::getId);
        map.put("taskNo", EnPatrolTaskPeriodEntity::getTaskNo);
        map.put("taskName", EnPatrolTaskPeriodEntity::getTaskName);
        map.put("maintainUnitNo", EnPatrolTaskPeriodEntity::getMaintainUnitNo);
        map.put("maintainUnitName", EnPatrolTaskPeriodEntity::getMaintainUnitName);
        map.put("maintainTeamNo", EnPatrolTaskPeriodEntity::getMaintainTeamNo);
        map.put("maintainTeamName", EnPatrolTaskPeriodEntity::getMaintainTeamName);
        map.put("patrolPersonId", EnPatrolTaskPeriodEntity::getPatrolPersonId);
        map.put("patrolPersonName", EnPatrolTaskPeriodEntity::getPatrolPersonName);
        map.put("patrolRoomNo", EnPatrolTaskPeriodEntity::getPatrolRoomNo);
        map.put("patrolRoomName", EnPatrolTaskPeriodEntity::getPatrolRoomName);
        map.put("patrolTargetNos", EnPatrolTaskPeriodEntity::getPatrolTargetNos);
        map.put("patrolTargetNames", EnPatrolTaskPeriodEntity::getPatrolTargetNames);
        map.put("patrolTargetTypeNos", EnPatrolTaskPeriodEntity::getPatrolTargetTypeNos);
        map.put("patrolTargetTypeNames", EnPatrolTaskPeriodEntity::getPatrolTargetTypeNames);
        map.put("planStartTime", EnPatrolTaskPeriodEntity::getPlanStartTime);
        map.put("planEndTime", EnPatrolTaskPeriodEntity::getPlanEndTime);
        map.put("patrolDescription", EnPatrolTaskPeriodEntity::getPatrolDescription);
        map.put("patrolTypeNo", EnPatrolTaskPeriodEntity::getPatrolTypeNo);
        map.put("patrolTypeName", EnPatrolTaskPeriodEntity::getPatrolTypeName);
        map.put("taskSourceNo", EnPatrolTaskPeriodEntity::getTaskSourceNo);
        map.put("pTaskStatusNo", EnPatrolTaskPeriodEntity::getPTaskStatusNo);
        map.put("pTaskStatusName", EnPatrolTaskPeriodEntity::getPTaskStatusName);
        map.put("aTaskStatusNo", EnPatrolTaskPeriodEntity::getATaskStatusNo);
        map.put("aTaskStatusName", EnPatrolTaskPeriodEntity::getATaskStatusName);
        map.put("creator", EnPatrolTaskPeriodEntity::getCreator);
        map.put("creatTime", EnPatrolTaskPeriodEntity::getCreatTime);
        map.put("sendPersonId", EnPatrolTaskPeriodEntity::getSendPersonId);
        map.put("sendPersonName", EnPatrolTaskPeriodEntity::getSendPersonName);
        map.put("sendTel", EnPatrolTaskPeriodEntity::getSendTel);
        map.put("sendTime", EnPatrolTaskPeriodEntity::getSendTime);
        map.put("receiverId", EnPatrolTaskPeriodEntity::getReceiverId);
        map.put("receiver", EnPatrolTaskPeriodEntity::getReceiver);
        map.put("receiverTel", EnPatrolTaskPeriodEntity::getReceiverTel);
        map.put("receiverTime", EnPatrolTaskPeriodEntity::getReceiverTime);
        map.put("receivingCoordinate", EnPatrolTaskPeriodEntity::getReceivingCoordinate);
        map.put("authTime", EnPatrolTaskPeriodEntity::getAuthTime);
        map.put("sceneDescription", EnPatrolTaskPeriodEntity::getSceneDescription);
        map.put("sitePictureIds", EnPatrolTaskPeriodEntity::getSitePictureIds);
        map.put("backTime", EnPatrolTaskPeriodEntity::getBackTime);
        map.put("aEndTime", EnPatrolTaskPeriodEntity::getAEndTime);
        map.put("aEndCoordinate", EnPatrolTaskPeriodEntity::getAEndCoordinate);
        map.put("isDel", EnPatrolTaskPeriodEntity::getIsDel);
        map.put("period", EnPatrolTaskPeriodEntity::getPeriod);
        map.put("periodEndTime", EnPatrolTaskPeriodEntity::getPeriodEndTime);
        map.put("isPeriod", EnPatrolTaskPeriodEntity::getIsPeriod);
        map.put("sourceTaskNo", EnPatrolTaskPeriodEntity::getSourceTaskNo);
        map.put("authPictureIds", EnPatrolTaskPeriodEntity::getAuthPictureIds);
        map.put("appraiseContent", EnPatrolTaskPeriodEntity::getAppraiseContent);
        map.put("appraisePersonId", EnPatrolTaskPeriodEntity::getAppraisePersonId);
        map.put("appraisePersonName", EnPatrolTaskPeriodEntity::getAppraisePersonName);
        map.put("appraiseTime", EnPatrolTaskPeriodEntity::getAppraiseTime);
        map.put("appraiseStatus", EnPatrolTaskPeriodEntity::getAppraiseStatus);
        map.put("appraiseStatusName", EnPatrolTaskPeriodEntity::getAppraiseStatusName);
        map.put("patrolConclusion", EnPatrolTaskPeriodEntity::getPatrolConclusion);
        map.put("isClean", EnPatrolTaskPeriodEntity::getIsClean);
        map.put("jfOverallPictureIds", EnPatrolTaskPeriodEntity::getJfOverallPictureIds);
        map.put("jfDoorwayPictureIds", EnPatrolTaskPeriodEntity::getJfDoorwayPictureIds);
        map.put("jfMajorEquipPictureIds", EnPatrolTaskPeriodEntity::getJfMajorEquipPictureIds);
        map.put("remark", EnPatrolTaskPeriodEntity::getRemark);
        map.put("executeStime", EnPatrolTaskPeriodEntity::getExecuteStime);
        map.put("executeEtime", EnPatrolTaskPeriodEntity::getExecuteEtime);
        map.put("executeId", EnPatrolTaskPeriodEntity::getExecuteId);
        map.put("executeTaskNo", EnPatrolTaskPeriodEntity::getExecuteTaskNo);
        map.put("executeStatus", EnPatrolTaskPeriodEntity::getExecuteStatus);
        map.put("executePeriodNum", EnPatrolTaskPeriodEntity::getExecutePeriodNum);
        map.put("creatorBm", EnPatrolTaskPeriodEntity::getCreatorBm);

    }

    public static SFunction<EnPatrolTaskPeriodEntity, ?> genColumnSFunction(String column) {
        return map.get(column);
    }
    /** end����Ǳ���Ҫ�Ķ�̬��������end   end */


}
